package com.jeeplus.modules.property.chargeflow.listener;

import com.jeeplus.common.utils.SpringContextHolder;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.property.chargeinfo.service.PropertyChargeinfoService;
import com.jeeplus.modules.property.subinfo.service.PropertyCarinfoService;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;

/**
 * @program: jeeplatform
 * @description:
 * @author: chenlong
 * @create: 2019-01-11 15:26
 **/
public class ChargeFlowListener implements ExecutionListener {
    private static PropertyChargeinfoService propertyChargeinfoService= SpringContextHolder.getBean(PropertyChargeinfoService.class);

    @Override
    public void notify(DelegateExecution delegateExecution) throws Exception {
        String procInsid=delegateExecution.getProcessInstanceId();
        if(StringUtils.isNotBlank(procInsid)) {
            propertyChargeinfoService.updatePayStatus(procInsid);
        }
    }
}
